package com.android.Bean;

import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.android.DBTools.ADUS;
import com.android.DBTools.DBConnection;

public class RoomCarBookBean {
	public void bookRoomOrCar(String genUID, String resType, String resUseDay) throws ClassNotFoundException, SQLException {
		Date date = new Date();
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
		String resDate = simpleDateFormat.format(date);
		String sql = "INSERT INTO roomcar (genUID,resType,resUseDay,resDate) VALUES(\"" + genUID + "\",\"" + resType + "\",\""
				+ resUseDay + "\",\"" + resDate + "\");";
		System.out.println(sql);
		ADUS.insertData(sql);
		DBConnection.closeCon();
	}
}
